package com.ljf.task.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.AddGroup;
import com.ljf.common.validation.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 任务列表--新增修改  task_dat_task_tabulation
 *
 * @author LJF
 * @since 2024-12-25
 */
@Data
@ApiModel("任务列表--新增修改")
public class TaskDatTaskTabulationCommand implements Serializable {

    @JsonProperty("id")
    @ApiModelProperty(value = "ID")
    @NotNull(message = "ID不能为空", groups = UpdateGroup.class)
    private Long id;

    @JsonProperty("menuCode")
    @ApiModelProperty(value = "菜单编码")
    @Length(message = "菜单编码不能超过60个字符", max = 60)
    @NotEmpty(message = "菜单编码不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String menuCode;

    @JsonProperty("title")
    @ApiModelProperty(value = "标题")
    @Length(message = "标题长度不能超过50个字符", max = 50)
    @NotEmpty(message = "标题不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String title;

    @JsonProperty("taskType")
    @ApiModelProperty(value = "任务类型")
    @NotNull(message = "任务类型不能为空", groups = {AddGroup.class})
    private Integer taskType;

}
